Skip to content

Open anchored response fields immediately - #181

Merged
max-sixty merged 4 commits into
mainfrom
codex/input-first-response-bar
Sep 1, 2026
Merged

Open anchored response fields immediately#181
max-sixty merged 4 commits into
mainfrom
codex/input-first-response-bar

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Anchored selections and items now open a focused compact Comment field immediately. The field grows in place, submits on Enter, and exchanges itself for Comment, Suggest, and reaction choices on Tab while preserving one shared visual and control primitive. The runtime keeps drafts and in-flight sends anchored across re-targeting, integrates the r route with the canonical target Button cluster, and updates examples, docs, and browser coverage.

This was written by Codex on behalf of @max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Four things from reading the runtime, none of them about the shape of the change — opening the field on the target the reader named reads well, and the bar/field sharing one control primitive removes the two-idioms problem the old 320px card had. Inline on the first three.

The fourth is outside the diff, so it needs a commit rather than a suggestion: openComposer's left and top are now dead — placeComposer was its only reader. Every call site still computes and threads them: fab.onclick takes a getBoundingClientRect() purely to pass it on, openOnDesign forwards from.left/from.top, and the restore-at-load path in leaf.js still passes (innerWidth - 320) / 2, 64 — a centring built from the card width whose CSS rule this PR deletes. Dropping the two positional parameters would also close the gap between them and suggest/about, which a five-argument call now has to count past.

Comment thread skills/leaf/assets/runtime/composing/selection.js Outdated
Comment thread skills/leaf/assets/leaf.js
Comment thread tests/test_render_anchors.py

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The three inline threads and the dead left/top parameters are all answered. The draft rule itself reads better than the version it replaces — leaving the words on the passage they were written about, and giving the explicit gestures a carry, is the right split now that a field opens on every selection.

Three things on the new commit, inline. The largest is that skills/leaf/CLAUDE.md still states the rule this commit reversed.

Comment thread skills/leaf/CLAUDE.md Outdated
Comment thread skills/leaf/assets/runtime/composing/surface.js Outdated
Comment thread skills/leaf/assets/runtime/composing/selection.js Outdated
@max-sixty
max-sixty merged commit 63930f9 into main Sep 1, 2026
6 checks passed
@max-sixty
max-sixty deleted the codex/input-first-response-bar branch September 1, 2026 02:55
leaf-agent added a commit that referenced this pull request Sep 1, 2026
…layout change

The nightly suite on main came back 10 failed. Most trace to #189, whose new
pr-walkthrough page replaced the one two nightly-only tests still name and whose
new package widget ships chrome the layer's markers never reached; two trace to
#190's zero-height ToC anchor, which shortened the release page past a named
scroll; and one is an ordering collision between Playwright's sync API and
asyncio.run.

- Point the two stale heading assertions at the page the example now is.
- Route the data-bound diff test's comment through the anchored field, which is
  where #181 moved the press it still clicked.
- Read the sticky sidebar's scroll position off the page instead of naming it.
- Give the author's description a surface the layer's muted ink clears, and the
  changed rows' line numbers an ink that clears their own fill.
- Build CallDiff's disclosure with offer, so an exported copy takes the press
  away, and give the location an href only where following it goes somewhere.
- Read a covered run against what it paints, so clipped overflow stops reading
  as words on words.
- Show a rendered diff and a scrolling code line in the corpus again, which is
  what the two unlit focus rings were missing.
- Run the MCP stdio exchange on its own thread, since the session-scoped browser
  holds an asyncio loop open in the worker's main one.
max-sixty added a commit that referenced this pull request Sep 1, 2026
Two files conflicted with #194, which rewrote the same PR-review surfaces.

`test_render_anchors.py` takes main's side whole. Both branches were
removing the same `.lf-fab` click that #181 stopped drawing; main replaced
it with `expect(.lf-fab-input).to_be_focused()`, and since the composer's
textarea *is* that field (`composerInput = fabInput` in leaf.js), the extra
click this branch added did nothing. That nightly failure is already fixed
on main.

`lf-call-diff.js` keeps main's `navigateToDatum` travel and this branch's
chrome markers. The two sides reached the same export-safety concern from
opposite ends: main added an `lfPrepareExport` hook that strips the toggle,
the counts and the hrefs on the way out; this branch built the toggle with
`offer`, whose `data-lf-offer` marker the standalone bake already removes.
The marker is the declared mechanism — widget-elements.js says a widget
writes none of the three markers by hand — so the hook goes and the flag
checks with it. The counts stay in the copy as `data-lf-gen` content rather
than being deleted: they are an account of the tree a reader still wants on
paper, not a press to take away. The row guard stays too, since it fixes the
live page as well as the copy — the header has no location to travel to, and
a link inside a `<summary>` is two gestures on one box.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149R6uAvYxfu8xSjMrbmj2z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants